package game;

/**
 * Classic Mode - has limit round and score is time that take.
 * @author Natchanon Hongladaromp
 *
 */
public class ClassicMode implements GameMode
{
	private Game game;
	private int limitRound;
	
	/**
	 * Construct for this mode.
	 * @param game
	 * @param limitRound
	 */
	public ClassicMode(Game game,int limitRound)
	{
		this.game = game;
		this.limitRound = limitRound;
	}
	
	@Override
	public double getScore()
	{
		return game.getTime();
	}
	
	@Override
	public String toString()
	{
		return "Classic Mode";
	}

	@Override
	public void newTask()
	{
		if(game.getRound() >= limitRound)
			game.end();
		else
			game.newTask();
	}

	@Override
	public void updateTime()
	{
	}

}
